home *** CD-ROM | disk | FTP | other *** search
- Path: grimsel.zurich.ibm.com!usenet
- From: wgk@zurich.ibm.com (Keith Whittingham)
- Newsgroups: comp.lang.c
- Subject: Re: C PORT command question
- Date: 7 Apr 1996 15:39:43 GMT
- Organization: IBM Research, ZRH
- Message-ID: <4k8njv$sre@grimsel.zurich.ibm.com>
- References: <4jurkh$4k9@newserv.ksu.ksu.edu>
- Reply-To: wgk@zurich.ibm.com
- NNTP-Posting-Host: pine.zurich.ibm.com
- X-Newsreader: IBM NewsReader/2 v1.00
-
- In <4jurkh$4k9@newserv.ksu.ksu.edu>, mgn@ksu.ksu.edu (Marc Nuessen) writes:
- >I'm unfamiliar with the Port command and need to use it to send data
- >to a device card at address 300.
- >
- >How would I for example write a $FF to port address 300?
- >
- >How would I read from port address 300?
- >
- >Any help would be appreciated.
- >
- >Thanks.
- >
-
- There is no "standard" way - it depends on the operating system and
- compiler you're using. Having a guess you're on a PC using borland
-
- outp(0x300, 0x21); // Out's a byte to port 0x300
- outpw(0x300, 0x2AF1); // Out's a word to port 0x300
- inp(0x300); // In's a byte from port 0x300
- inpw(0x300); // In's a word from port 0x300
-
- Keith
-
-
-
-
-
-